

var newer = newer || {};
newer.gd = newer.gd || {};

newer.AboutDiv = function(o) {
	this.domNode = o.domNode;
	this.prt = o.prt;
	
	this.init();
};

newer.AboutDiv.prototype = {
	
	init: function() {
		this.domNode.html("");
		this.refresh();
	},
	
	refresh: function() {
		this.update();
	},
	
	update: function() {
		this.domNode.html("");
		this.domNode.append('<div id="about-div"></div>');
		this.aboutNode = $("#about-div");
		this.showAbout(this.aboutNode);
	},
	
	showAbout: function(node) {
		switch(newer.gd.pstatus.ptype) {
			case newer.UriHelper.PEOPLE_TYPE:
				this.showPeopleAbout(node);
				break;
			case newer.UriHelper.CIRCLE_TYPE:
				this.showCircleAbout(node);
				break;
			default:
		}
	},
	
	showPeopleAbout: function(node) {
		node.append('<div id="about-email">'+newer.gd.people.email+'</div>');
		node.append('<div id="about-company">'+newer.gd.people.company+'</div>');
	},
	
	showCircleAbout: function(node) {
		node.append('<div id="about-name">'+newer.gd.circle.name+'</div>');
		node.append('<div id="about-location">'+newer.gd.circle.location+'</div>');
	}	
};